<template>
    <div class="tab-nav">
        <router-link tag="div" to="/recommend" class="tab-item">推荐</router-link>
        <router-link tag="div" to="/rank" class="tab-item">排行</router-link>
        <router-link tag="div" to="/search" class="tab-item">搜索</router-link>
    </div>
</template>

<script>
export default {
  name: 'tab-nav'
}
</script>

<style lang="less" scoped>
@import '../assets/less/variable.less';
.tab-nav {
  width:100%;
  position: fixed;
  top: 44px;
  left: 0;
  display: flex;
  background: #fff;
  .tab-item {
    flex: 1;
    line-height: 40px;
    text-align: center;
    color: @text
  }
  .router-link-active {
    position: relative;
    color: @background
  }
  .router-link-active:after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #31c27c;
  }
}
</style>
